	document.getElementById("boxCodeInput").addEventListener('input', function(event) {
					if(this.value.length>5){
						queryAll(  )
					}
				}, false);	
	var itemDict={}
mui.get("item/findAll", "", function(res) {
				if (res.code != "200") {
					mui.confirm(res.msg)
					return;
				} 
				 
				items= res.data;
				for(var i=0;i<items.length;i++){ 
					itemDict[items[i].i]=items[i];
				}
				 
			}, "json");
			
			function appendChind(content,list,tmp){
				
				for(var i=0;i<list.length;i++){
					var det=list[i]
					var iid=det.itemId;
					var item=itemDict[iid];
					var v = i + 1;
					var info= "(" +v +")";
					info += det.itemCode; 
					info+= "（"+det.countDb+")"
					if(det.status==2){
						info+="库外" 
					}
					if(det.status==5){
						info+="运行中"
						
					}	
					var html=document.body.querySelector(tmp).innerHTML
				
					var data= html.replace("sgj_data",info).replace("sgj_id",det.id)
					
					var li = document.createElement('li');
					li.className = "mui-table-view-cell";
					li.innerHTML = data
					content.appendChild(li)
				}
			}
			
			
			function queryAll( ){
				var value=document.getElementById("boxCodeInput").value
				mui.get("pda/getStock/"+value, "", function(res) {
					var content = document.body.querySelector('#OA_task_2');
					content.innerHTML=""
					if (res.code != "200") {
						mui.confirm(res.msg)
						return;
					} 
					selectStock=res.data.main
					
					var list= res.data.detList;
					appendChind(content,list,"#removeTmp");
					if(loadOther){
							loadOther();
						
					}
				
				}, "json");
			}